

load('tlDatasets.mat')

%data=reformat(houseA,0);

dataA=multiplesensors(houseA,[1 9 14]);
dataB=multiplesensors(houseB,[6 9 27]);

dataB(:,5)=dataB(:,5)+100;
data=[dataA;dataB];

num_s=127;
num_run
nings=100;
num_c=4;
% set in cluster.m which dimensions to use for clustering

tabel=multipleruns(data,num_s,num_c,num_runnings)

% data1=reformat(houseA,1);   % microwave
% data7=reformat(houseA,7);   % cups cupboard
% data9=reformat(houseA,9);   % plates cupboard
% data14=reformat(houseA,14); % toiletflush
% data20=reformat(houseA,20); % washingmachine
% data24=reformat(houseA,24); % hall-bedroomdoor
% 
% scatter3(data1(:,1),data1(:,2),data1(:,4),'r','x');
% hold on;xlabel('startingtime');ylabel('duration');zlabel('numberof');
% scatter3(data7(:,1),data7(:,2),data7(:,4),'g','x');
% scatter3(data9(:,1),data9(:,2),data9(:,4),'b','x');
% scatter3(data14(:,1),data14(:,2),data14(:,4),'m','*');
% scatter3(data20(:,1),data20(:,2),data20(:,4),'c','s');
% scatter3(data24(:,1),data24(:,2),data24(:,4),'k','o');

% groupsensors(houseA,24)

% A_microwave=reformat(houseA,1);
% A_toiletdoor=reformat(houseA,5);
% A_cups=reformat(houseA,7);
% A_fridge=reformat(houseA,8);
% A_plates=reformat(houseA,9);
% A_toiletflush=reformat(houseA,14);

% B_toiletflush=reformat(houseB,6);

% mean(A_toiletflush)
% mean(B_toiletflush)
% mean(A_microwave)
% cov(A_toiletflush)
% cov(B_toiletflush)
% cov(A_microwave)




